/*
*	File: CoreMaterialSet.h
*	Date: 12/17/2011
*	Author: Ivan Gao
*	Desc: class that store a set of CoreMaterials
*/
#include "CoreMaterialSet.h"
SCoreMaterialSet::SCoreMaterialSet ()
{

}

SCoreMaterialSet::~SCoreMaterialSet ()
{

}

vector<SCoreMaterial> & SCoreMaterialSet::GetCoreMaterialVector()
{
	return m_vecCoreMaterials;
} // GetCoreMaterialVector

const vector<SCoreMaterial> & SCoreMaterialSet::GetCoreMaterialVector() const
{
	return m_vecCoreMaterials;
} // GetCoreMaterialVector

int SCoreMaterialSet::GetSize (void) const
{
	return (int)m_vecCoreMaterials.size();
} // GetSize

void SCoreMaterialSet::Reserve(int nSize)
{
	m_vecCoreMaterials.reserve(nSize);
} // Reserve

void SCoreMaterialSet::AddCoreMaterial (const SCoreMaterial & rCoreMaterial)
{
	SCoreMaterial coreMaterial (rCoreMaterial);
	m_vecCoreMaterials.push_back(coreMaterial);
} // AddCoreMaterial

SCoreMaterial * SCoreMaterialSet::GetCoreMaterial (int nIndex)
{
	if (nIndex >= 0 && nIndex < m_vecCoreMaterials.size ())
	{
		return &m_vecCoreMaterials[nIndex];
	}
	return NULL;
} // if

const SCoreMaterial * SCoreMaterialSet::GetCoreMaterial (int nIndex) const
{
	if (nIndex >= 0 && nIndex < (int)m_vecCoreMaterials.size ())
	{
		return &m_vecCoreMaterials[nIndex];
	}
	return NULL;
} // if
 

